package cn.lg.soar.system.biz.modules.auth.entity;

import cn.lg.soar.common.enums.DataStatusEnum;
import cn.lg.soar.core.annotations.constraints.group.*;
import cn.lg.soar.database.query.annotations.*;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.*;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.*;
import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.*;

import cn.lg.soar.database.base.entity.BaseEntity;

/**
 * 职位标签
 * @author luguoxiang
 * @since 2025-08-14
 * 开源项目：https://gitee.com/lgx1992/lg-soar 求star！请给我star！请帮我点个star！
 */
@Data
@Schema(description = "职位标签")
@TableName("lg_sys_post_tag")
public class PostTag extends BaseEntity {

    /** 主键 */
    @NotNull(message = "主键不能为空", groups = { Update.class })
    @ExcelIgnore
    @Schema(description = "主键")
    @TableId
    private Long id;

    /** 编码 */
    @NotBlank(message = "编码不能为空", groups = { Create.class, Update.class })
    @ExcelProperty(value = "编码")
    @Schema(description = "编码")
    private String code;

    /** 名称 */
    @NotBlank(message = "名称不能为空", groups = { Create.class, Update.class })
    @ExcelProperty(value = "名称")
    @Schema(description = "名称")
    private String name;

    /** 描述 */
    @ExcelProperty(value = "描述")
    @Schema(description = "描述")
    private String description;

    /** 状态(0正常，2禁用) */
    @NotNull(message = "状态(0正常，2禁用)不能为空", groups = { Create.class, Update.class })
    @ExcelProperty(value = "状态(0正常，2禁用)")
    @Schema(description = "状态(0正常，2禁用)")
    private DataStatusEnum status;

    @JsonIgnore
    @Override
    public Long primaryKey() {
        return this.id;
    }

}
